package com.his.core.utils;

public class StringUtils extends org.apache.commons.lang3.StringUtils {
    /**
     * Object转String
     * @param obj
     * @return
     */
    public static String object2String(Object obj) {
        return null == obj ? "" : obj.toString();
    }

    public static int getActLen(String str) {
        int l = 0;
        if(StringUtils.isBlank(str)) {
            return 0;
        }
        char c;
        for(int i = 0; i < str.length(); i ++) {
            c = str.charAt(i);
            if((c + "").getBytes().length == 1) {
                l += 1;
            } else {
                l += 2;
            }
        }
        return l;
    }
}
